/////////////////////////////////////////////////////////////////////////////
// Name:        ApplyDialog.cpp
// Purpose:     
// Author:      yospaly
// Modified by: 
// Created:     14/01/2009 16:18:06
// RCS-ID:      
// Copyright:   Copyright (C) 2008, yospaly
// Licence:     
/////////////////////////////////////////////////////////////////////////////

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

////@begin includes
////@end includes

#include "ApplyDialog.h"

////@begin XPM images
////@end XPM images


/*!
 * ApplyDialog type definition
 */

IMPLEMENT_DYNAMIC_CLASS( ApplyDialog, wxDialog )


/*!
 * ApplyDialog event table definition
 */

BEGIN_EVENT_TABLE( ApplyDialog, wxDialog )

////@begin ApplyDialog event table entries
////@end ApplyDialog event table entries

END_EVENT_TABLE()


/*!
 * ApplyDialog constructors
 */

ApplyDialog::ApplyDialog()
{
    Init();
}

ApplyDialog::ApplyDialog( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
    Init();
    Create(parent, id, caption, pos, size, style);
}


/*!
 * ApplyDialog creator
 */

bool ApplyDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin ApplyDialog creation
    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
    Centre();
////@end ApplyDialog creation
    return true;
}


/*!
 * ApplyDialog destructor
 */

ApplyDialog::~ApplyDialog()
{
////@begin ApplyDialog destruction
////@end ApplyDialog destruction
}


/*!
 * Member initialisation
 */

void ApplyDialog::Init()
{
////@begin ApplyDialog member initialisation
    p_changes_textctrl = NULL;
////@end ApplyDialog member initialisation
}


/*!
 * Control creation for ApplyDialog
 */

void ApplyDialog::CreateControls()
{    
////@begin ApplyDialog content construction
    ApplyDialog* itemDialog1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemDialog1->SetSizer(itemBoxSizer2);

    wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("Following packages are marked for changing :"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_LEFT|wxALL, 5);

    p_changes_textctrl = new wxTextCtrl( itemDialog1, ID_CHANGES_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH2|wxTE_AUTO_URL );
    itemBoxSizer2->Add(p_changes_textctrl, 1, wxGROW|wxALL, 5);

    wxStdDialogButtonSizer* itemStdDialogButtonSizer5 = new wxStdDialogButtonSizer;

    itemBoxSizer2->Add(itemStdDialogButtonSizer5, 0, wxALIGN_RIGHT|wxALL, 5);
    wxButton* itemButton6 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStdDialogButtonSizer5->AddButton(itemButton6);

    wxButton* itemButton7 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStdDialogButtonSizer5->AddButton(itemButton7);

    itemStdDialogButtonSizer5->Realize();

////@end ApplyDialog content construction

    // Keep original system font size
    wxFont font = p_changes_textctrl->GetFont();
    font.SetFaceName(_T("Courier New"));
    p_changes_textctrl->SetFont(font);
}


/*!
 * Should we show tooltips?
 */

bool ApplyDialog::ShowToolTips()
{
    return true;
}

/*!
 * Get bitmap resources
 */

wxBitmap ApplyDialog::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
////@begin ApplyDialog bitmap retrieval
    wxUnusedVar(name);
    return wxNullBitmap;
////@end ApplyDialog bitmap retrieval
}

/*!
 * Get icon resources
 */

wxIcon ApplyDialog::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin ApplyDialog icon retrieval
    wxUnusedVar(name);
    return wxNullIcon;
////@end ApplyDialog icon retrieval
}



